with ($ns("g"))
{
    g.ReaderServiceClass = function()
    {
        var me = new EventDispatcher();

        me.init = function()
        {
            
        };
        
        me.send = function(p_options)
        {
            var options = {
                path: null,
                beforeSend: _beforeSend,
                type: "GET",
                dataType: "json"
            };
            $.extend(options, p_options);
            
            if (options.path != null)
            {
                options.url = $mappath("$google/reader/api/0") + options.path;
            }
            delete options.path;
            
            if (options.type == "POST")
            {
                if (g.Account.token != null)
                {
                    if (options.data == null)
                    {
                        options.data = {};
                    }
                    options.data.T = g.Account.token;
                }
            }
            
            $.ajax(options);
        };
        
        me.get = function(p_options)
        {
            me.send(p_options);
        };
        
        me.post = function(p_options)
        {
            if (p_options == null)
            {
                p_options = {};
            }
            p_options.type = "POST";
            me.send(p_options);
        };
        
        
        
        
        function _beforeSend(p_request)
        {
            p_request.setRequestHeader("Authorization", "GoogleLogin auth=" + g.Account.authCode);
        }
        
        return me;
    };
    
    
    g.ReaderService = new g.ReaderServiceClass();
    g.ReaderService.init();
}